/**
 * 
 */
package com.gragra.stats;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
/**
 * @author Christoph Teichmann
 * created Jun 17, 2013 4:38:09 PM
 * @version 0.1
 */
public class CountTags
{
	/**
	 *
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException
	{
		Set<String> tags = new HashSet<String>();
		BufferedReader br = new BufferedReader(new FileReader(args[0]));
		String line;
		while((line = br.readLine()) != null)
		{
			String[] arr = line.trim().split("\\s");
			for(String s : arr)
			{tags.add(s.split("\\|")[1]);}
		}
		br.close();
		System.out.println(tags.size());
	}
}